export const INDEX_GRAIN = 0;
export const INDEX_GOLD = 1;
export const INDEX_TECH = 2;

export const CSC = {
    area: {
        progress: [50,50,34,34,25],//建造area每回合增长的进度
        //产出：1~5级，[grain,gold,tech]
        production: {
            city: [
                [1,1,1],
                [1,2,1],
                [1,2,2],
                [2,3,2],
                [3,4,3]
            ],
            agriculture: [
                [1,0,0],
                [2,0,0],
                [3,1,0],
                [4,1,0],
                [5,2,1]
            ],
            industry: [
                [0,1,1],
                [0,2,1],
                [0,3,1],
                [1,4,1],
                [1,5,1]
            ],
            industryResearch: [
                [0,1,3],
                [0,1,6],
                [0,0,12],
                [0,0,18],
                [0,-1,24]
            ],
            research: [
                [0,-1,2],
                [0,-2,4],
                [0,-3,8],
                [0,-4,12],
                [0,-5,16]
            ],
            militery: [
                [0,0,0],
                [1,-1,0],
                [1,-1,0],
                [1,-2,1],
                [1,-2,1]
            ],
            militeryResearch: [
                [0,0,3],
                [0,-1,5],
                [0,-1,9],
                [0,-2,15],
                [0,-2,20]
            ]
        },
        //area人力消耗1~5级
        popularCost: {
            agriculture: [1,3,5,7,9],
            industry: [1,3,5,7,9],
            research: [1,3,7,15,31],
            militery: [1,3,5,7,9],
            city: [0,1,3,5,7]
        }
    },
    army: {
        cost: [2,3,3,4,4],//维护费（gold）
        power: [1,3,10,30,100],//战斗力
        powerUpdate: 1.5,
        movement: [1,1,3,3,8],//移动力
        stack: 100,//每个army最大数量
        product: [5,5,4,4,3],//建造army每回合产出数量
    },
    city: {
        maxPopular: [3,10,30,100,300],
        maxGrain: [10,30,100,300,1000],
        popularUp: 1.1,
        popularDown: 0.8,
        civilingRadius: 3,
        mutualRadius: 2,
        civilingDown: 10,
        civiling: (popular:number,distance:number)=>{
            return Math.ceil(10*Math.log(popular)/Math.sqrt(distance))|0;
        },
        wallMax: [100,300,1000,3000,10000],
        wallRenew: [20,50,100,200,500]
    },
    tech: {
        //民用科技点数用于计算area最大等级
        //军用科技点数用于计算部队等级
        threshold: [300,800,1800,3800],//达到对应等级需要的科技点数
        militaryConvert: 0.2,
        industryConvert: 0.1,
        sight: [3,3,3,5,7]
    }
};
